 <template>
  <div class='container'>
          <el-dialog title="新增文章" :visible.sync="dialogAdd" @close ='cls'>
        <el-form :model="form">
          <el-form-item label="文章标题" :label-width="formLabelWidth">
            <el-input v-model="item.title" placeholder="请输入文章标签"></el-input>
          </el-form-item>
          <el-form-item>
            <!-- 富文本编辑框 -->
            <!-- <div ref="editorElem" :v-model="ArticlesList.articleBody"></div> -->
            <!--  -->
            <!--  -->
            <!-- 富文本编辑框 -->
          </el-form-item>
          <el-form-item label="视频地址" :label-width="formLabelWidth">
            <el-input v-model="item.videoURL" placeholder="请输入视频地址"></el-input>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogAdd = false">取 消</el-button>
          <el-button type="primary" @click="dialogAdd = false">确 定</el-button>
        </div>
      </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    dialogAdd: {
      type: Boolean,
      default: false
    },
    item: {
      type: Object
    }
  },
  data () {
    return {
      formLabelWidth: '120px',
      form: {
        title: '',
        articleBody: '',
        videoURL: '',
        page: 1,
        pagesize: 10,
        keyword: '',
        state: null
      }
    }
  },
  methods: {
    cls () {
      this.$emit('update:dialogAdd', false)
    }
  }
}
</script>

<style scoped lang='less'></style>
